<template>
  <el-pagination
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
    :current-page="queryParams.currentPage4"
    :page-sizes="[1, 2, 5, 10]"
    :page-size="queryParams.pagesize"
    layout="total, sizes, prev, pager, next, jumper"
    :total="total"
  >
  </el-pagination>
</template>
<script>
export default {
  name: 'page',
  props: {
    queryParams: {
      type: Object,
      required: true
    },
    total: {
      type: Number,
      required: true
    }
  },
  methods: {
    handleSizeChange(val) {
      this.$emit('size', val)
    },
    handleCurrentChange(val) {
      this.$emit('current', val)
    }
  }
}
</script>
